<!-- 顶部菜单区域 开始 -->
<div class="framework-topbar">
    <div class="topbar-head pull-left">
        <a href="{:url('@')}" class="topbar-logo pull-left">{:sysconf('app_name')} <sup>{:sysconf('app_version')}</sup></a>
    </div>
    {foreach $layoutmenus as $oneMenu}
    <a data-menu-node="m-{$oneMenu.id}" data-open="{$oneMenu.url}" class="topbar-btn pull-left transition {if condition="$topParentMenu.id eq $oneMenu.id"}active{/if}">
        {notempty name='oneMenu.icon'}<span class='font-s13 {$oneMenu.icon}'></span>&nbsp;{/notempty}
        {$oneMenu.title|default=''}
    </a>
    {/foreach}
    <div class="pull-right">
        {if session('user.id')}
        <div class="dropdown">

            <a href="#" class="dropdown-toggle topbar-btn text-center transition" data-toggle="dropdown">
                <span class="glyphicon glyphicon-user font-s13"></span>
                {:session('user.username')}
                <span class="toggle-icon glyphicon glyphicon-menu-up transition font-s13"></span>
            </a>
            <ul class="dropdown-menu">
                <li class="topbar-btn"><a data-modal="{:url('admin/index/pass')}?id={:session('user.id')}" data-title="修改密码"><i class="glyphicon glyphicon-lock"></i> 修改密码</a></li>
                <li class="topbar-btn"><a data-modal="{:url('admin/index/info')}?id={:session('user.id')}" data-title="修改资料"><i class="glyphicon glyphicon-edit"></i> 修改资料</a></li>
                <li class="topbar-btn">
                    <a data-load="{:url('admin/login/out')}" data-confirm="确定要退出登录吗？"><i class="glyphicon glyphicon-log-out"></i> 退出登录</a>
                </li>
            </ul>
        </div>
        {else}
        <div class="topbar-info-item">
            <a data-href="{:url('@admin/login')}" data-toggle="dropdown" class=" topbar-btn text-center">
                <span class='glyphicon glyphicon-user'></span> 立即登录 </span>
            </a>
        </div>
        {/if}
    </div>
    <a class="topbar-btn pull-right transition" data-tips-text="切换公众号" data-menu-node="m-1-43-44" data-open="{:url('admin/wechat/index')}">
        <span class="fa fa-wechat font-s13"></span>
        {:session('wechatInfo.name')}
    </a>
    <a class="topbar-btn pull-right transition" data-tips-text="消除缓存" data-load="{:url('admin/index/clear')}" data-confirm="确定要消除缓存吗？" style="width:50px"><span class="glyphicon glyphicon-refresh font-s12"></span></a>
</div>
<!-- 顶部菜单区域 结束 -->

<!-- 左则菜单区域 开始 -->
<div class="framework-leftbar">
    {foreach $layoutmenus as $oneMenu}
    {notempty name='$oneMenu.sub'}
    <div class="leftbar-container {if condition="$topParentMenu.id neq $oneMenu.id"}hide{/if} notselect" data-menu-layout="m-{$oneMenu.id}">
        <div class="line-top">
            <i class="layui-icon font-s12">&#xe65f;</i>
        </div>
        {foreach $oneMenu.sub as $twoMenu}
        {empty name='$twoMenu.sub'}
        <a class='transition' data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}" data-open="{$twoMenu.url}">
            {notempty name='twoMenu.icon'}<span class='{$twoMenu.icon} font-icon'></span>&nbsp;{/notempty}
            {$twoMenu.title}
        </a>
        {else}
        <div class="{if condition="$currentMenu.pid eq $twoMenu.id"}open{/if}" data-submenu-layout='m-{$oneMenu.id}-{$twoMenu.id}'>
            <a class='menu-title transition'>
                {notempty name='twoMenu.icon'}<span class='{$twoMenu.icon} font-icon'></span>&nbsp;{/notempty}
                {$twoMenu.title} <i class='layui-icon pull-right font-s12 transition'>&#xe619;</i>
            </a>
            <div>
                {foreach $twoMenu.sub as $thrMenu}
                <a class='transition {if condition="$currentMenu.id eq $thrMenu.id"}active{/if} ' data-open="{$thrMenu.url}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">
                    {notempty name='thrMenu.icon'}<span class='{$thrMenu.icon} font-icon'></span>{/notempty} {$thrMenu.title}
                </a>
                {/foreach}
            </div>
        </div>
        {/empty}
        {/foreach}
    </div>
    {/notempty}
    {/foreach}
</div>
<!-- 左则菜单区域 结束 -->